package com.pa.chong.pachong;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
@EnableJpaAuditing
@EnableScheduling
public class PachongApplication {


    public static void main(String[] args) {
        SpringApplication.run(PachongApplication.class, args);

    }

    @Configuration
    public class RestConfiguration {
        @Autowired
        RestTemplateBuilder builder;
        @Bean
        public RestTemplate restTemplate(){
            return builder.build();
        }
    }
}
